/**
 * =====================================================================================
 *       @file  ngx_event_posted.c
 *      @brief  
 *
 *  Detailed description starts here.
 *
 *   @internal
 *     Created  2012年05月14日 21时58分52秒 
 *    Revision  1.0.0.0
 *    Compiler  gcc/g++
 *
 *     @author  luis
 * =====================================================================================
 */

#include <stdio.h>
#include "ngx_event_posted.h"
#include "ngx_cycle.h"
#include "ngx_event.h"
#include "ngx_core.h"

ngx_event_t  *ngx_posted_accept_events;
ngx_event_t  *ngx_posted_events;

void ngx_event_process_posted(ngx_cycle_t *cycle, ngx_event_t **posted)
{
    ngx_event_t  *ev;

    for ( ;; ) {

        ev = (ngx_event_t *) *posted;

        printf("posted event %p", ev);

        if (ev == NULL) {
            return;
        }

        ngx_delete_posted_event(ev);

        ev->handler(ev);
    }
}





